|
|
|
|
|
|
|
' now enumerate the empty table defs
strMsg = ""
For Each td In db.TableDefs
For Each pr In td.Properties
strMsg = strMsg & pr.Name
strMsg = strMsg & " = "
strMsg = strMsg & pr.Value
strMsg = strMsg & " {"
strMsg = strMsg & ShowType(pr.Type) & "}"
strMsg = strMsg & vbCrLf
Next
'
MsgBox strMsg, vbInformation, "TableDefs"
strMsg = ""
'
Next
'
db.Close
ws.Close
Set pr = Nothing
Set td = Nothing
Set db = Nothing
Set ws = Nothing
'
Exit Sub
'
LocalErr:
strMsg = strMsg & "<err>"
Resume Next
'
End Sub |
|
|
|
|
|
|
|
|
The code in Listing 9.14 opens a database and then "walks through" all the table definitions in the database, listing the properties of each table. Save and run the project. Click the TableDef button and compare your screen with the one in Figure 9.13. |
|
|
|
|
|
|
|
|
Figure 9.13.
Viewing the TableDef properties. |
|
|
|
|
|